class Person:
    def __init__(self,name,weight):
        self.name = name
        self.weight = weight

    def __str__(self):
        return "我的名字叫%s 体重是%.2f" % (self.name,self.weight)

    def run(self):
        self.weight -= 0.5
        print(self.weight)

    
    def eat(self):
        self.weight += 1
        print(self.weight)

# 同一个类创建的多个对象之间，属性互不干扰
xiaoming = Person("小明",75.0)

xiaoming.run()
xiaoming.eat()

print(xiaoming)

xiaomei = Person("小美",45.0)

xiaomei.eat()
xiaomei.run()

print(xiaomei)
